<!DOCTYPE html>
<html>
    <head>
        <script src="../vue.global.js"></script>
    </head>
    <body>
        <div id="app">
            <p v-if="isVisible">不可见</p>
            <button @click="fun">切换可见性</button>

        </div>
        <script>
            Vue.createApp({
                data(){
                    return{
                        isVisible:true
                    };
                },
                methods:{
                    fun(){
                        this.isVisible=!this.isVisible;
                    }
                }
            }).mount('#app');
        </script>
    </body>
</html>